package com.njwb.thread;

/**
 * Description: 类的描述
 * Author: yuandeyin@itany.com
 * Date: 2025-08-06 15:09
 * Version: 1.0
 */
public class TestThread {
    public static void main(String[] args) {
        //两个线程，分别输出1-10
        //main线程 + MyThread线程
        //实例化第一个线程
        MyThread myThread = new MyThread();
        //启动线程
        myThread.start();//等CPU

        for(int i = 1; i <= 10 ; i++){
            System.out.println(Thread.currentThread().getName() + i);
        }
    }
}
